package com.huawei.gamebox.service.welfare.gift.node;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.widget.LinearLayout;
import com.huawei.gamebox.service.common.cardkit.node.BaseGsNode;
import com.huawei.gamebox.service.welfare.common.card.GsTitleCard;
import com.huawei.gamebox.service.welfare.gift.card.SimpleItemsCard;
import o.azb;
import o.chy;
import o.cih;
import o.exp.d;
import o.exp.j;

public class SimpleItemsNode extends BaseGsNode {
    public SimpleItemsNode(Context context) {
        super(context);
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
        layoutParams.weight = 1.0f;
        LayoutInflater from = LayoutInflater.from(this.ॱ);
        LinearLayout linearLayout = (LinearLayout) from.inflate(j.ˋˊ, null);
        GsTitleCard gsTitleCard = new GsTitleCard(this.ॱ);
        View ˏ = ˏ(from);
        azb.ˏ(ˏ, d.ˎ);
        gsTitleCard.ˏ(ˏ);
        linearLayout.addView(ˏ);
        cih simpleItemsCard = new SimpleItemsCard(this.ॱ);
        simpleItemsCard.ˊ(gsTitleCard);
        View linearLayout2 = new LinearLayout(this.ॱ);
        LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-1, -2);
        linearLayout2.setOrientation(1);
        linearLayout2.setLayoutParams(layoutParams2);
        azb.ˏ(linearLayout2);
        simpleItemsCard.ˏ(linearLayout2);
        ˊ(simpleItemsCard);
        linearLayout.addView(linearLayout2);
        viewGroup.addView(linearLayout, layoutParams);
        return true;
    }

    private View ˏ(LayoutInflater layoutInflater) {
        return layoutInflater.inflate(j.ˊˊ, null);
    }

    public void ˋ(chy o_chy) {
        SimpleItemsCard simpleItemsCard = (SimpleItemsCard) ˊ(0);
        if (simpleItemsCard != null) {
            simpleItemsCard.ˋ().ॱ(o_chy);
        }
    }
}
